{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% import 'include/_macros.html' as macros %}
{% block title %}首页{% endblock %}
{% block content %}
{{ super() }} 

{#<div class="container">#}
{#    <div class="page-header">#}
{#        <h1>#}
{#            {% if current_user.is_authenticated %}#}
{#            欢迎回来, {{ current_user.username }} #}
{#            {% else %}#}
{#            文章列表#}
{#            {% endif %}#}
{#        </h1>#}
{#    </div>#}
{#</div>#}

<div class="container">
    <div class="row">
        {% include 'include/_aside.html' %}
        <div class="col-md-8 well bs-component">
            <div class="post-tabs">
                <ul class="nav nav-tabs">
                    <li {% if not show_followed %}class="active" {% endif %}>
                        <a href="{{ url_for('main.show_all') }}">所有文章</a>
                    </li>
                    {% if current_user.is_authenticated %}
                    <li {% if show_followed %}class="active" {% endif %}>
                        <a href="{{ url_for('main.show_followed') }}">我的关注</a>
                    </li>
                    {% endif %}
                </ul>
            </div>

            {% include 'include/_post.html' %}
            <nav class="text-center"> 
                <ul class="pagination">
                    {{ macros.pagination_widget(pagination, 'main.index') }}
                </ul>
            </nav>
        </div>
    </div>
</div>
{% endblock %}

{% block footer %}
    {{ super() }}
{% endblock %}

{% block scripts %}
    {{ super() }}
    {{ pagedown.include_pagedown() }}
{% endblock %}

